<?php 
class dv_payments_model extends CI_Model {
        function __construct()
        {
                parent::__construct();        
                $this->load->helper("local");
                $this->load->helper('date');
                $this->load->database();
        } 
//START-----------------dv_payments-------------------------//              
    	function get_all_dv_payments()
        {
			    $this->load->database();
                $query = $this->db->query("select * from vendor_payments  order by load_no DESC");
			return $query->result();
        }
		 function getdvSearchByloadno($loadno)
       {       $query = $this->db->query ("select * from vendor_payments where load_no like '%$loadno%' order by load_no DESC Limit 10");
				return $query->result();
       }
	
        function getdv_payments_info($code)
        {        
                $query = $this->db->query("select *from vendor_payments where dv_payment_id='$code'");
                 //return $query->result();
				 return $query->row();
        }
		
		 function getpaymentInfoBypaymentNo($load_no)
        {       $query = $this->db->query ("select * from vendor_payments where load_no='$load_no' ");
				return $query->row();
        }


//End-----------------dv_payments -------------------------//              		

}
?>
